<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSystemsgCreateTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('systemsg_create', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('创建人ID');
            $table->string('name','255')->default('')->comment('创建人姓名');
            $table->integer('company_id')->comment('公司ID');
            $table->string('title_one','255')->default('')->comment('标题1');
            $table->string('title_two','255')->default('')->comment('标题2');
            $table->string('title_three','255')->default('')->comment('标题3');
            $table->string('title_four','255')->default('')->comment('标题4');
            $table->text('content_one')->nullable()->comment('消息内容1');
            $table->text('content_two')->nullable()->comment('消息内容2');
            $table->text('content_three')->nullable()->comment('消息内容3');
            $table->text('content_four')->nullable()->comment('消息内容4');
            $table->string('imgurl_one',255)->default('')->comment('图片路径1');
            $table->string('imgurl_two',255)->default('')->comment('图片路径2');
            $table->string('imgurl_three',255)->default('')->comment('图片路径3');
            $table->string('imgurl_four',255)->default('')->comment('图片路径4');
            $table->string('content_oneurl',255)->default('')->comment('消息路经1');
            $table->string('content_twourl',255)->default('')->comment('消息路经2');
            $table->string('content_threeurl',255)->default('')->comment('消息路经3');
            $table->string('content_foururl',255)->default('')->comment('消息路经4');
            $table->tinyInteger('status')->default('0')->comment('删除状态 0:正常，1删除');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `systemsg_create` comment '创建系统消息'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('systemsg_create');
    }
}
